package org.btik.lightweb.client.settings;

import org.btik.light.server.platform.common.api.bean.common.StatusResult;
import org.btik.light.server.platform.common.api.service.SystemSettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author lustre
 * @since 2023/6/29 13:56
 */
@RestController
@RequestMapping("/sys_settings")
public class SystemSettingsController {
    @Autowired
    private SystemSettingsService systemSettingsService;

    @GetMapping("/get")
    public  StatusResult<Map<String, String>> getSysSettings() {
        return systemSettingsService.getSysSettings();
    }

    @PostMapping("/update")
    public StatusResult<Void> updateSettings(@RequestBody Map<String, String> settings) {
         return systemSettingsService.updateSettings(settings);
    }


}
